package 线程;

public class Test3 {
    public static void main(String[] args) {
        //创建线程对象
        线程3 mr=new 线程3();
        //把自定的线程对象 丢给Thread构造
        Thread thread=new Thread(mr);
        thread.start();
        for (int i=1;i<=50;i++){
            if (i==10){
                try {
                    thread.join();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
            System.out.println(Thread.currentThread().getName()+"-"+i);
        }

    }
}
